import request from '@/utils/request'

// 获取面试记录列表
export function getInterviewRecordList(params) {
    return request({
        url: '/interview-record/getAllRecord',
        method: 'get',
        params
    })
}

// 添加面试记录
export function addInterviewRecord(data) {
    return request({
        url: '/interview-record/addRecord',
        method: 'post',
        data
    })
}

// 更新面试记录
export function updateInterviewRecord(data) {
    return request({
        url: '/interview-record/updateRecord',
        method: 'post',
        data
    })
}

// 删除面试记录
export function deleteInterviewRecord(id) {
    return request({
        url: `/interview-record/deleteRecord/${id}`,
        method: 'delete'
    })
}

// 获取候选人列表
export function getCandidateList() {
    return request({
        url: '/interview-record/candidate/list',
        method: 'get'
    })
}

// 获取职位列表
export function getPositionList() {
    return request({
        url: '/interview-record/position/list',
        method: 'get'
    })
}

// 获取面试官列表
export function getInterviewerList() {
    return request({
        url: '/api/system/interviewers/list',
        method: 'get'
    })
}

// 获取面试详情
export function getInterviewDetail(id) {
    return request({
        url: `/interview-record/getRecordById/${id}`,
        method: 'get'
    })
}

// 获取面试回复信息
export function getInterviewResponses(candidateId) {
    return request({
        url: '/interviewRecover/page',
        method: 'get',
        params: {
            candidateId: candidateId,
            pageNum: 1,
            pageSize: 100  // 设置较大的页面大小以获取所有记录
        }
    })
}

// 获取问题详情
export function getQuestionDetail(questionId) {
    return request({
        url: '/api/question/' + questionId,
        method: 'get'
    })
} 